home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 4 / QRZ Ham Radio Callsign Database - Volume 4.iso / files / dsp / 56ktools / dspkgctr.z / dspkgctr / gcc / config / tm-dsp96k.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-08  |  38.1 KB  |  1,097 lines

  1. /* Definitions of target machine for GNU compiler, for the Motorola dsp96000
  2.    digital signal processing chip.
  3.    Copyright (C) 1988 Free Software Foundation, Inc.
  4.  
  5.     $Header: /usr1/dsp/cvsroot/source/gcc/config/tm-dsp96k.h,v 1.30 92/04/02 10:41:19 pete Exp $
  6.     $Id: tm-dsp96k.h,v 1.30 92/04/02 10:41:19 pete Exp $
  7.  
  8. This file is part of GNU CC.
  9.  
  10. GNU CC is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY.  No author or distributor
  12. accepts responsibility to anyone for the consequences of using it
  13. or for whether it serves any particular purpose or works at all,
  14. unless he says so in writing.  Refer to the GNU CC General Public
  15. License for full details.
  16.  
  17. Everyone is granted permission to copy, modify and redistribute
  18. GNU CC, but only under the conditions described in the
  19. GNU CC General Public License.   A copy of this license is
  20. supposed to have been given to you along with GNU CC so you
  21. can know your rights and responsibilities.  It should be in a
  22. file named COPYING.  Among other things, the copyright notice
  23. and this notice must be preserved on all copies.  */
  24.  
  25.  
  26. /* Note that some other tm- files include this one and then override
  27.    many of the definitions that relate to assembler syntax.  */
  28.  
  29. #define DSP96000 1
  30.  
  31. /* Turn on debugging output */
  32.  
  33. #define SDB_DEBUGGING_INFO
  34.  
  35. /* Names to predefine in the preprocessor for this target machine.  */
  36.  
  37. #define CPP_PREDEFINES "-DDSP96K"
  38.  
  39. /* Print subsidiary information on the compiler version in use.  */
  40. #define TARGET_VERSION fprintf (stderr, " Motorola DSP96002 %s", \
  41.                 motorola_version_string);
  42.  
  43. /* Run-time compilation parameters selecting different hardware subsets. */
  44.  
  45. extern int target_flags;
  46.  
  47. /* Macro to define tables used to set the flags.
  48.    This is a list in braces of pairs in braces,
  49.    each pair being { "NAME", VALUE }
  50.    where VALUE is the bits to set or minus the bits to clear.
  51.    An empty string NAME is used to identify the default VALUE.  */
  52.  
  53. #define TARGET_DSP                ( target_flags & ( 3 + 96 ))
  54. #define TARGET_LINV_PLUS_BIV_PROMOTION        ( target_flags & 1 )
  55. #define TARGET_DO_LOOP_GENERATION        ( target_flags & 2 )
  56. #define TARGET_X_MEMORY                 ( target_flags & 4 )
  57. #define TARGET_Y_MEMORY                ( target_flags & 8 )
  58. #define TARGET_L_MEMORY                ( target_flags & 16 )
  59. #define TARGET_CALL_OVERHEAD_REDUCTION        ( target_flags & 32 )
  60. #define TARGET_RELOAD_CLEANUP            ( target_flags & 64 )
  61. #define TARGET_STACK_CHECK            ( target_flags & 4096 )
  62. #define TARGET_SWITCHES              \
  63.   {{ "dsp", ( 3 + 96 ) },            \
  64.    { "no-dsp", -( 3 + 96 ) },             \
  65.    { "linv-plus-biv-promotion", 1 },        \
  66.    { "no-linv-plus-biv-promotion", -1 },    \
  67.    { "do-loop-generation", 2 },            \
  68.    { "no-do-loop-generation", -2 },        \
  69.    { "x-memory", 4 },                \
  70.    { "y-memory", 8 },                \
  71.    { "l-memory", 16 },                \
  72.    { "call-overhead-reduction", 32 },           \
  73.    { "no-call-overhead-reduction", -32 },       \
  74.    { "reload-cleanup", 64 },            \
  75.    { "no-reload-cleanup", -64 },        \
  76.    { "stack-check", 4096 },                     \
  77.    { "no-stack-check", 4096 },                  \
  78.    { "", TARGET_DEFAULT}}
  79.  
  80. #define TARGET_DEFAULT ( 3 + 16 + 96 )
  81.  
  82. /* target machine storage layout */
  83.  
  84. /* Define this if most significant bit is lowest numbered
  85.    in instructions that operate on numbered bit-fields.  */
  86. /* m96k is numbered 31..0 */
  87. #undef BITS_BIG_ENDIAN
  88.  
  89. /* Define this if most significant byte of a word is the lowest numbered.  */
  90. /* has no byte address but if it did they would look like 3..2..1..0 */
  91. #undef BYTES_BIG_ENDIAN
  92.  
  93. /* Define this if most significant word of a multiword object has the lowest
  94.    is number. */
  95. /* m96k has no multiword objects */
  96. #undef WORDS_BIG_ENDIAN 
  97.  
  98. /* number of bits in an addressible storage unit. m96k has word addressing */
  99. #define BITS_PER_UNIT 32
  100. #define BITS_PER_WORD 32
  101. #define CHAR_TYPE_SIZE 32
  102. #define SHORT_TYPE_SIZE 32
  103. #define FLOAT_TYPE_SIZE 31
  104. #define DOUBLE_TYPE_SIZE (( 'l' == memory_model ) ? 32 : 64 )
  105. #define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE
  106. /* long long is turned off in the front end. */
  107. #define LONG_LONG_TYPE_SIZE 64
  108.  
  109. /* the maximum nesting depth of do-loops allowed. */
  110. #define MAX_DO_LOOP_NESTING 3
  111.  
  112. /* Width in bits of a "word", which is the contents of a machine register.
  113.    Note that this is not necessarily the width of data type `int';
  114.    if using 16-bit ints on a 68000, this would still be 32.
  115.    But on a machine with 16-bit registers, this would be 16.  */
  116. #define BITS_PER_WORD 32
  117. #define MAX_FIXED_MODE_SIZE 32
  118.  
  119. /* Width of a word, in units (bytes).  */
  120. /* m96k has word addressing */
  121. #define UNITS_PER_WORD 1
  122.  
  123. /* Width in bits of a pointer.
  124.    See also the macro `Pmode' defined below.  */
  125. #define POINTER_SIZE 32
  126.  
  127. /* Allocation boundary (in *bits*) for storing pointers in memory.  */
  128. #define POINTER_BOUNDARY 32
  129.  
  130. /* Allocation boundary (in *bits*) for storing arguments in argument list.  */
  131. #define PARM_BOUNDARY 32
  132.  
  133. /* Allocation boundary (in *bits*) for the code of a function.  */
  134. #define FUNCTION_BOUNDARY 32
  135.  
  136. /* Alignment of field after `int : 0' in a structure.  */
  137. #define EMPTY_FIELD_BOUNDARY 32
  138.  
  139. /* No data type wants to be aligned rounder than this.  */
  140. #define BIGGEST_ALIGNMENT 32
  141.  
  142. /* Define this if move instructions will actually fail to work
  143.    when given unaligned data.  */
  144. /* m96k cannot have unaligned data */
  145. #define STRICT_ALIGNMENT
  146.  
  147. /* Standard register usage.  */
  148.  
  149. /*
  150.   Number of actual hardware registers.
  151.   The hardware registers are assigned numbers for the compiler
  152.   from 0 to just below FIRST_PSEUDO_REGISTER.
  153.   All registers that the compiler knows about must be given numbers,
  154.   even those that are not normally considered general registers.
  155.  
  156.   40 registers for the m96k ( 24 data + 8 address + 8 index )
  157. */
  158. #define FIRST_PSEUDO_REGISTER 40
  159.  
  160. /* 1 for registers that have pervasive standard uses
  161.    and are not available for the register allocator.
  162.  
  163.    for the m96k:
  164.  
  165.    0..23   = (d0.l,d0.m,d0.h)..(d7.l,d7.m,d7.h) general data registers
  166.    24..29  = r0..r5 address registers
  167.    30       = r6 frame pointer
  168.    31      = r7 stack pointer
  169.    32..37  = n0..n5 index registers
  170.    38       = n6 index register associted in hardware to frame pointer
  171.    39       = n7 index register associted in hardware to stack pointer
  172. */
  173. #define FIXED_REGISTERS   \
  174.  {0, 0, 0, 0, 0, 0, 0, 0, \
  175.   0, 0, 0, 0, 0, 0, 0, 0, \
  176.   0, 0, 0, 0, 0, 0, 0, 0, \
  177.   1, 0, 0, 0, 0, 0, 1, 0, \
  178.   1, 0, 0, 0, 0, 0, 1, 0}
  179.  
  180. /* Like FIXED_REGISTERS but has a 1 for each register that is clobbered
  181.    ( in general ) by function calls. This macro therefore identifies the
  182.    registers that are not available for general allocation of values that
  183.    live across function calls.
  184.    If a register has 0 in CALL_USED_REGISTERS the compiler automatically
  185.    saves it on function entry if the register is used within that function.
  186.  
  187.    These must include the FIXED_REGISTERS and also any
  188.    registers that can be used without being saved.
  189.    The latter must include the registers where values are returned
  190.    and the register where structure-value addresses are passed.
  191.    Aside from that, you can include as many other registers as you like.  */
  192. #define CALL_USED_REGISTERS  \
  193.  {1, 1, 1, 1, 1, 1, 0, 0, \
  194.   0, 0, 0, 0, 0, 0, 0, 0, \
  195.   0, 0, 0, 0, 0, 0, 0, 0, \
  196.   1, 0, 0, 0, 0, 0, 1, 0, \
  197.   1, 0, 0, 0, 0, 0, 1, 0}
  198.  
  199. /* Return number of consecutive hard regs needed starting at reg REGNO
  200.    to hold something of mode MODE.
  201.    This is ordinarily the length in words of a value of mode MODE
  202.    but can be less for certain modes in special long registers.
  203.  
  204.    m96k puts floats and doubles into 96 bit registers, double integers
  205.    into 64 bit registers and everything else into 32 bit registers */
  206.  
  207. #define HARD_REGNO_NREGS(REGNO, MODE) \
  208.     ( ( MODE == DFmode || MODE == SFmode ) ? 3 : ( MODE == DImode ) ? 2 : 1 )
  209.  
  210. /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
  211.    For m96k, data registers are allocated on a mode 3 basis. DFmode
  212.    is also restricted to data registers */ 
  213.  
  214. #define HARD_REGNO_MODE_OK(REGNO, MODE)\
  215.     (((MODE) == DFmode || (MODE) == SFmode || (MODE) == DImode )\
  216.      ? (( REGNO < 24 ) && ( 0 == ( REGNO % 3 )))     \
  217.      : 1 )
  218.  
  219. /* Value is 1 if it is a good idea to tie two pseudo registers
  220.    when one has mode MODE1 and one has mode MODE2.
  221.    If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
  222.    for any hard reg, then this must be 0 for correct output.  
  223.    For m96k DFmode cannot be tieable because HARD_REGNO_MODE_OK
  224.    is not the same for DFmode and other modes */
  225.  
  226. #define MODES_TIEABLE_P(MODE1, MODE2)         \
  227.     (((MODE1) == DFmode || (MODE1) == SFmode ) &&\
  228.      ((MODE2) == DFmode || (MODE2) == SFmode ))
  229.  
  230. /* Specify the registers used for certain standard purposes.
  231.    The values of these macros are register numbers.  */
  232.  
  233. /* m96k has a dedicated pc */
  234. #undef PC_REGNUM
  235.  
  236. /* Register to use for pushing function arguments.  */
  237. #define STACK_POINTER_REGNUM 30
  238.  
  239. /* Base register for access to local variables of the function.  */
  240. #define FRAME_POINTER_REGNUM 24
  241.  
  242. /* Value should be nonzero if functions must have frame pointers.
  243.    Zero means the frame pointer need not be set up (and parms
  244.    may be accessed via the stack pointer) in functions that seem suitable.
  245.    This is computed in `reload', in reload1.c.  */
  246. #define FRAME_POINTER_REQUIRED 1
  247.  
  248. /* Base register for access to arguments of the function.  */
  249. /* m96k uses the frame pointer (r6) to as the argument pointer */
  250. #define ARG_POINTER_REGNUM FRAME_POINTER_REGNUM
  251.  
  252. /* Register in which static-chain is passed to a function.  */
  253. /* This is currently not used but this may change for pascal or ada or ... */
  254. #define STATIC_CHAIN_REGNUM 15
  255.  
  256. /* Register in which address to store a structure value
  257.    is passed to a function.  */
  258. /* pcc for the m96k returns pointer types in r0 and all others in d0,
  259.    however there does not seem to be a way to get gcc to do the same thing.
  260.    */
  261. #define STRUCT_VALUE_REGNUM 31
  262.  
  263.  
  264. /* Define the classes of registers for register constraints in the
  265.    machine description.  Also define ranges of constants.
  266.  
  267.    One of the classes must always be named ALL_REGS and include all hard regs.
  268.    If there is more than one class, another class must be named NO_REGS
  269.    and contain no registers.
  270.  
  271.    The name GENERAL_REGS must be the name of a class (or an alias for
  272.    another name such as ALL_REGS).  This is the class of registers
  273.    that is allowed by "g" or "r" in a register constraint.
  274.    Also, registers outside this class are allocated only when
  275.    instructions express preferences for them.
  276.  
  277.    The classes must be numbered in nondecreasing order; that is,
  278.    a larger-numbered class must never be contained completely
  279.    in a smaller-numbered class.
  280.  
  281.    For any two classes, it is very desirable that there be another
  282.    class that represents their union.  */
  283.    
  284. /* dsp96k register set looks like this:
  285.  
  286.    d0..d7 are general purpose date registers each of which can be
  287.    used as either a set of three 32 bit registers or as a single 96
  288.    bit register. In general, only the low 32 bits of each register
  289.    can be used for integer type instructions. The only execeptions
  290.    are shift instructions which use the high order 32 bits as a shift
  291.    count.
  292.    
  293.    d8..d9 are 96 bit registers identical in type to d0..d7. However d8..d9
  294.    cannot be used by most opcodes.
  295.  
  296.    r0..r7 are 32 bit address registers.
  297.  
  298.    n0..n7 are 32 bit index registers.
  299.  
  300.    For the compiler the register set will be used as follows:
  301.  
  302.        data type            register class
  303.  
  304.        integer             d0..d7
  305.  
  306.        floating point        d0..d7
  307.  
  308.        pointer            r0..r7
  309.  
  310.    n0..n7 will be used as index registers and also for pointer,
  311.    integer operations such a multiplication. They will have to be
  312.    allocated based on the name of the address register being used
  313.    i.e for r0, n0 will have to be allocated. */
  314.  
  315. enum reg_class
  316. {
  317.     NO_REGS,
  318.     LO_DATA_REGS,
  319.     HI_DATA_REGS,
  320.     DI_REGS,
  321.     FP_REGS,
  322.     ADDR_REGS,
  323.     DATA_OR_ADDR_REGS,
  324.     INDX_REGS,
  325.     ALL_REGS,
  326.     LIM_REG_CLASSES
  327. };
  328.  
  329. #define N_REG_CLASSES (int) LIM_REG_CLASSES
  330.  
  331. /* Since GENERAL_REGS is the same class as ALL_REGS,
  332.    don't give it a different class number; just make it an alias.  */
  333.  
  334. #define GENERAL_REGS ALL_REGS
  335.  
  336. /* Give names of register classes as strings for dump file.   */
  337.  
  338. #define REG_CLASS_NAMES {                    \
  339.     "NO_REGS", "LO_DATA_REGS", "HI_DATA_REGS",        \
  340.     "DI_REGS", "FP_REGS", "ADDR_REGS", "DATA_OR_ADDR_REGS",    \
  341.     "INDX_REGS", "ALL_REGS"                    \
  342.                                 }
  343.  
  344. /* Define which registers fit in which classes.
  345.    This is an initializer for a vector of HARD_REG_SET
  346.    of length N_REG_CLASSES.  */
  347.  
  348. #define REG_CLASS_CONTENTS {                    \
  349.     000000000000, 000000000000,    /* NO_REGS */        \
  350.     000011111111, 000000000000,    /* LO_DATA_REGS .l */    \
  351.     000044444444, 000000000000,    /* HI_DATA_REGS .h */    \
  352.     000033333333, 000000000000,     /* DI_REGS .ml */       \
  353.     000077777777, 000000000000,    /* FP_REGS */        \
  354.     037700000000, 000000000000,    /* ADDR_REGS */        \
  355.     037711111111, 000000000000,    /* DATA_OR_ADDR_REGS */    \
  356.     000000000000, 000000000377,    /* INDX_REGS */        \
  357.     037777777777, 000000000377     /* ALL_REGS */        };    
  358.  
  359. /* The same information, inverted:
  360.    Return the class number of the smallest class containing
  361.    reg number REGNO.  This could be a conditional expression
  362.    or could index an array.  */
  363.  
  364. #define REGNO_REG_CLASS(REGNO)                    \
  365.     (( 24 <= REGNO ) ?                         \
  366.      (( 32 > REGNO ) ? ADDR_REGS : INDX_REGS ) :        \
  367.      (( 0 == REGNO % 3 ) ? LO_DATA_REGS :            \
  368.       (( 1 == REGNO % 3 ) ? DATA_OR_ADDR_REGS : HI_DATA_REGS )))
  369.  
  370. /* The class value for index registers, and the one for base regs.  */
  371. #define INDEX_REG_CLASS INDX_REGS
  372. #define BASE_REG_CLASS ADDR_REGS
  373.  
  374. /* Get reg_class from a letter such as appears in the machine description.  */
  375.  
  376. #define REG_CLASS_FROM_LETTER(C) ( 'd' == ( C )            \
  377.                   ? LO_DATA_REGS        \
  378.                   : ( 'h' == ( C )        \
  379.                      ? HI_DATA_REGS        \
  380.                      : ( 'a' == ( C )        \
  381.                     ? ADDR_REGS        \
  382.                     : ( 'f' == ( C )    \
  383.                        ? FP_REGS        \
  384.                        : ( 'n' == ( C )    \
  385.                           ? INDX_REGS    \
  386.                           : ( 'D' == ( C )  \
  387.                          ? DI_REGS      \
  388.                          : NO_REGS ))))))
  389.  
  390.  
  391. /* The letters I, J, K, L and M in a register constraint string
  392.    can be used to stand for particular ranges of immediate operands.
  393.    This macro defines what the ranges are.
  394.    C is the letter, and VALUE is a constant value.
  395.    Return 1 if VALUE is in the range specified by C.
  396. */
  397. #define CONST_OK_FOR_LETTER_P(VALUE, C)              \
  398.     ( ( 'I' == ( C ) && 0 == ( VALUE ))                \
  399.      || ( 'J' == ( C ) && ( 1 ==  ( VALUE )))            \
  400.      || ( 'K' == ( C ) && ( -2 <= ( VALUE ) && 2 >= ( VALUE )))    \
  401.      || ( 'L' == ( C ) && ( 0 == ( 0xfff80000 & ( VALUE )))))
  402.  
  403. /* Similar, but for floating constants, and defining letters G and H.
  404.    Here VALUE is the CONST_DOUBLE rtx itself.  */
  405.  
  406. #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0
  407.  
  408. /* Given an rtx X being reloaded into a reg required to be
  409.    in class CLASS, return the class of reg to actually use.
  410.    In general this is just CLASS; but on some machines
  411.    in some cases it is preferable to use a more restrictive class.  */
  412. #define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS)
  413.  
  414. /* Return the maximum number of consecutive registers
  415.    needed to represent mode MODE in a register of class CLASS.  */
  416. /* For m96k a data register can hold any value except a double integer
  417.    an address register can only hold a 32 bit quantity, meaning that a 
  418.    double float stored in an address register would require two registers.
  419.    However, it is not really possible in the hardware to store a double
  420.    into a pair of address registers, so this had better never come up. */
  421. #define CLASS_MAX_NREGS(CLASS, MODE)                    \
  422.     (((CLASS) == FP_REGS && ((MODE) == DFmode || (MODE) == SFmode )) ? 3 :\
  423.      (((CLASS) == DI_REGS && (MODE) == DImode ) ? 2 : 1 ))
  424.  
  425. /* Stack layout; function entry, exit and calling.  */
  426.  
  427. #define PUSH_ARGS_REVERSED
  428.  
  429. /* Define this if pushing a word on the stack
  430.    makes the stack pointer a smaller address.  */
  431. #undef STACK_GROWS_DOWNWARD
  432.  
  433. /* Define this if the nominal address of the stack frame
  434.    is at the high-address end of the local variables;
  435.    that is, each additional local variable allocated
  436.    goes at a more negative offset in the frame. */
  437.  
  438. #undef FRAME_GROWS_DOWNWARD 
  439.  
  440. /* Offset within stack frame to start allocating local variables at.
  441.    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
  442.    first local allocated.  Otherwise, it is the offset to the BEGINNING
  443.    of the first local allocated.  */
  444. #define STARTING_FRAME_OFFSET 0
  445.  
  446. /* If we generate an insn to push BYTES bytes,
  447.    this says how many the stack pointer really advances by. */
  448. /* #define PUSH_ROUNDING(BYTES) ( BYTES ) - 1 size on 96k. */
  449. #define PUSH_ROUNDING(BYTES) ( BYTES ) 
  450.  
  451. /* If BYTES is the size of arguments for a function call,
  452.    return the size of the argument block (which is BYTES suitably rounded).
  453.    Define this only on machines where the entire call block is allocated
  454.    before the args are stored into it.  */
  455.    
  456. #undef ROUND_CALL_BLOCK_SIZE
  457.  
  458. /* Offset of first parameter from the argument pointer register value.  */
  459. #define FIRST_PARM_OFFSET(FNDECL) \
  460.     local_first_parm_offset ( FNDECL )
  461.  
  462. /* Value is 1 if returning from a function call automatically
  463.    pops the arguments described by the number-of-args field in the call.
  464.    FUNTYPE is the data type of the function (as a tree),
  465.    or for a library call it is an identifier node for the subroutine name.  */
  466.  
  467. #define RETURN_POPS_ARGS(FUNTYPE) 1
  468.  
  469. /* Define how to find the value returned by a function.
  470.    VALTYPE is the data type of the value (as a tree).
  471.    If the precise function being called is known, FUNC is its FUNCTION_DECL;
  472.    otherwise, FUNC is 0.  */
  473.  
  474. #define LIBCALL_VALUE(MODE)  gen_rtx (REG, MODE, 0)
  475.  
  476. #define FUNCTION_VALUE(VALTYPE, FUNC)  LIBCALL_VALUE ( TYPE_MODE (VALTYPE) )
  477.  
  478. /* Define how to find the value returned by a library function
  479.    assuming the value has mode MODE.  */
  480.  
  481. /* 1 if N is a possible register number for a function value
  482.    as seen by the caller.*/
  483.  
  484. #define FUNCTION_VALUE_REGNO_P(N) ( 0 == ( N ) )
  485.  
  486. /* 1 if N is a possible register number for function argument passing. */
  487.  
  488. #define FUNCTION_ARG_REGNO_P(N) ( 0 == ( N ) || 3 == ( N ) )
  489.  
  490. /* Define a data type for recording info about an argument list
  491.    during the scan of that argument list.  This data type should
  492.    hold all necessary information about the function itself
  493.    and about the args processed so far, enough to enable macros
  494.    such as FUNCTION_ARG to determine where the next arg should go.
  495. */
  496. #define CUMULATIVE_ARGS int
  497.  
  498. /* Initialize a variable CUM of type CUMULATIVE_ARGS
  499.    for a call to a function whose data type is FNTYPE.
  500.    For a library call, FNTYPE is 0.
  501. */
  502. #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE) \
  503.  ((CUM) = 0 )
  504.  
  505. /* Update the data in CUM to advance over an argument
  506.    of mode MODE and data type TYPE.
  507.    (TYPE is null for libcalls where that information may not be available.)  */
  508.  
  509. #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) ((CUM) ++)
  510.  
  511. /* Determine where to put an argument to a function.
  512.    Value is zero to push the argument on the stack,
  513.    or a hard register in which to store the argument.
  514.  
  515.    MODE is the argument's machine mode.
  516.    TYPE is the data type of the argument (as a tree).
  517.     This is null for libcalls where that information may
  518.     not be available.
  519.    CUM is a variable of type CUMULATIVE_ARGS which gives info about
  520.     the preceding args and about the function being called.
  521.    NAMED is nonzero if this argument is a named parameter
  522.     (otherwise it is an extra parameter matching an ellipsis).  */
  523.  
  524. #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED)            \
  525. (( 2 <= CUM || BLKmode == MODE || 0 == NAMED )            \
  526.  ? 0 : gen_rtx ( REG, ( MODE ), 3 * CUM ))
  527.  
  528. /* Define where a function finds its arguments.
  529.    This would be different from FUNCTION_ARG if we had register windows.  */
  530.  
  531. #define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED)\
  532.     local_function_incoming_arg ( CUM, MODE, TYPE, NAMED )
  533.  
  534. /* For an arg passed partly in registers and partly in memory,
  535.    this is the number of registers used.
  536.    For args passed entirely in registers or entirely in memory, zero.  */
  537.  
  538. #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) 0
  539.  
  540. /* This macro generates the assembly code for function entry.
  541.    FILE is a stdio stream to output the code to.
  542.    SIZE is an int: how many units of temporary storage to allocate.
  543.    Refer to the array `regs_ever_live' to determine which registers
  544.    to save; `regs_ever_live[I]' is nonzero if register number I
  545.    is ever used in the function.  This macro is responsible for
  546.    knowing which registers should not be saved even if used.  */
  547.  
  548. #define FUNCTION_PROLOGUE(FILE, SIZE) function_logue ( FILE, SIZE, 0 )
  549.  
  550. /* Output assembler code to FILE to increment profiler label # LABELNO
  551.    for profiling a function entry.
  552.    m96k cannot profile. */
  553.  
  554. #define FUNCTION_PROFILER(FILE, LABELNO) 
  555.  
  556. /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
  557.    the stack pointer does not matter.  The value is tested only in
  558.    functions that have frame pointers.
  559.    No definition is equivalent to always zero.  */
  560.  
  561. #define EXIT_IGNORE_STACK 0
  562.  
  563. /* This macro generates the assembly code for function exit,
  564.    on machines that need it.  If FUNCTION_EPILOGUE is not defined
  565.    then individual return instructions are generated for each
  566.    return statement.  Args are same as for FUNCTION_PROLOGUE.
  567.  
  568.    The function epilogue should not depend on the current stack pointer!
  569.    It should use the frame pointer only.  This is mandatory because
  570.    of alloca; we also take advantage of it to omit stack adjustments
  571.    before returning.  */
  572.  
  573. #define FUNCTION_EPILOGUE(FILE, SIZE) function_logue ( FILE, SIZE, 1 )
  574.  
  575. /* If the memory address ADDR is relative to the frame pointer,
  576.    correct it to be relative to the stack pointer instead.
  577.    This is for when we don't use a frame pointer.
  578.    ADDR should be a variable name.  */
  579.  
  580. #define FIX_FRAME_POINTER_ADDRESS(ADDR,DEPTH) 
  581.  
  582. /* Addressing modes, and classification of registers for them.  */
  583.  
  584. #define HAVE_POST_INCREMENT
  585. #define HAVE_POST_DECREMENT
  586.  
  587. #undef HAVE_PRE_DECREMENT
  588. #undef HAVE_PRE_INCREMENT 
  589.  
  590. /* Macros to check register numbers against specific register classes.  */
  591.  
  592. /* These assume that REGNO is a hard or pseudo reg number.
  593.    They give nonzero only if REGNO is a hard reg of the suitable class
  594.    or a pseudo reg currently allocated to a suitable hard reg.
  595.    Since they use reg_renumber, they are safe only once reg_renumber
  596.    has been allocated, which happens in local-alloc.c.  */
  597.  
  598. #define REGNO_OK_FOR_BASE_P(REGNO)                  \
  599.     ( ( REGNO < 32 && REGNO > 23 ) ||                 \
  600.     ( ( ( unsigned ) reg_renumber[REGNO] < 32 ) &&        \
  601.     ( ( unsigned ) reg_renumber[REGNO] > 23 ) ) )
  602.  
  603. #define REGNO_OK_FOR_INDEX_P(REGNO)                 \
  604.     ( ( REGNO < 40 && REGNO > 31 ) ||                 \
  605.     ( ( ( unsigned ) reg_renumber[REGNO] < 40 ) &&        \
  606.     ( ( unsigned ) reg_renumber[REGNO] > 31 ) ) )
  607.  
  608. /* Now macros that check whether X is a register and also,
  609.    strictly, whether it is in a specified class.
  610.  
  611.    These macros are specific to the the m96000, and may be used only
  612.    in code for printing assembler insns and in conditions for
  613.    define_optimization.  */
  614.  
  615. /* Maximum number of registers that can appear in a valid memory address.  */
  616.  
  617. #define MAX_REGS_PER_ADDRESS 1
  618.  
  619. /* Recognize any constant value that is a valid address.  */
  620.  
  621. #define CONSTANT_ADDRESS_P(X)  CONSTANT_P (X)
  622.  
  623. /* Nonzero if the constant value X is a legitimate general operand.
  624.    It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE.  */
  625.  
  626. #define LEGITIMATE_CONSTANT_P(X) (CONSTANT_P(X))
  627.  
  628. /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
  629.    and check its validity for a certain class.
  630.    We have two alternate definitions for each of them.
  631.    The usual definition accepts all pseudo regs; the other rejects
  632.    them unless they have been allocated suitable hard regs.
  633.    The symbol REG_OK_STRICT causes the latter definition to be used.
  634.  
  635.    Most source files want to accept pseudo regs in the hope that
  636.    they will get allocated to the class that the insn wants them to be in.
  637.    Source files for reload pass need to be strict.
  638.    After reload, it makes no difference, since pseudo regs have
  639.    been eliminated by then.  */
  640.  
  641. # ifndef REG_OK_STRICT
  642.  
  643. /*
  644.  * Nonzero if X is a hard reg that can be used as an index
  645.  * or if it is a pseudo reg.
  646.  */
  647. # define REG_OK_FOR_INDEX_P(X) ( ( REG_P ( X )                \
  648.                  && ( REGNO ( X ) < FIRST_PSUEDO_REG ) )\
  649.                    ?                    \
  650.                    REGNO_OK_FOR_INDEX ( REGNO ( P ) )    \
  651.                    :                    \
  652.                    REG_P ( X ) )
  653.  
  654. /*
  655.  * Nonzero if X is a hard reg that can be used as a base reg
  656.  * or if it is a pseudo reg.
  657.  */
  658. # define REG_OK_FOR_BASE_P(X)  ( ( REG_P ( X )                \
  659.                  && ( REGNO ( X ) < FIRST_PSUEDO_REG ) )\
  660.                    ?                    \
  661.                    REGNO_OK_FOR_BASE ( REGNO ( X ) )    \
  662.                    :                    \
  663.                    REG_P ( X ) )
  664. # else
  665.  
  666. /* Nonzero if X is a hard reg that can be used as an index.  */
  667. # define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X))
  668.  
  669. /* Nonzero if X is a hard reg that can be used as a base reg.  */
  670. # define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
  671.  
  672. # endif
  673.  
  674. /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
  675.    that is a valid memory address for an instruction.
  676.    The MODE argument is the machine mode for the MEM expression
  677.    that wants to use this address.
  678.  
  679.    On the m96000, the actual legitimate addresses must be REG+REG or
  680.    REG+SMALLINT. But we can treat a SYMBOL_REF as legitimate if it is
  681.    part of this function's constant-pool, because such addresses can
  682.    actually be output as REG+SMALLINT.  */
  683.  
  684. # ifdef REG_OK_STRICT
  685. # define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)         \
  686.     if ( go_if_legitimate_address ( MODE, X, 1 ) ) goto ADDR;
  687. # else
  688. # define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)         \
  689.     if ( go_if_legitimate_address ( MODE, X, 0 ) ) goto ADDR;
  690. # endif
  691.  
  692. /* Try machine-dependent ways of modifying an illegitimate address
  693.    to be legitimate.  If we find one, return the new, valid address.
  694.    This macro is used in only one place: `memory_address' in explow.c.
  695.  
  696.    OLDX is the address as it was before break_out_memory_refs was called.
  697.    In some cases it is useful to look at this to decide what needs to be done.
  698.  
  699.    MODE and WIN are passed so that this macro can use
  700.    GO_IF_LEGITIMATE_ADDRESS.
  701.  
  702.    It is always safe for this macro to do nothing.  It exists to recognize
  703.    opportunities to optimize the output.  */
  704.  
  705. #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)
  706.  
  707. /* Go to LABEL if ADDR (a legitimate address expression)
  708.    has an effect that depends on the machine mode it is used for.
  709.    The m96000 is word addressed with 64 bits at each address so
  710.    this is never true.  */
  711.  
  712. # define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
  713.  
  714.  
  715. /* Specify the machine mode that this machine uses
  716.    for the index in the tablejump instruction.  */
  717. #define CASE_VECTOR_MODE SImode
  718.  
  719. /* Define this if a raw index is all that is needed for a
  720.    `tablejump' insn.  */
  721. #undef CASE_TAKES_INDEX_RAW
  722.  
  723. /* Define this if the tablejump instruction expects the table
  724.    to contain offsets from the address of the table.
  725.    Do not define this if the table should contain absolute addresses.  */
  726. #undef CASE_VECTOR_PC_RELATIVE
  727.  
  728. /* Specify the tree operation to be used to convert reals to integers.  */
  729. #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
  730.  
  731. /* This is the kind of divide that is easiest to do in the general case.  */
  732. #define EASY_DIV_EXPR TRUNC_DIV_EXPR
  733.  
  734. /* Define this as 1 if `char' should by default be signed; else as 0.  */
  735. #define DEFAULT_SIGNED_CHAR 1
  736.  
  737. /* Max number of bytes we can move from memory to memory
  738.    in one reasonably fast instruction.  */
  739. #define MOVE_MAX 1
  740.  
  741. /* We can't use move by pieces due to l space problems. */
  742. #define MOVE_RATIO 0
  743. #define MOVE_RATIO_96 5
  744.  
  745. /* Nonzero if access to memory by bytes is slow and undesirable.  */
  746. #define SLOW_BYTE_ACCESS 1
  747.  
  748. /* Do not break .stabs pseudos into continuations.  */
  749. #define DBX_CONTIN_LENGTH 0
  750.  
  751. /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
  752.    is done just by pretending it is already truncated.  */
  753. #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) \
  754.     ( 32 == OUTPREC && 64 == INPREC )
  755.  
  756. /* We assume that the store-condition-codes instructions store 0 for false
  757.    and some other value for true.  This is the value stored for true.  */
  758.  
  759. #define STORE_FLAG_VALUE 1
  760.  
  761. /* Specify the machine mode that pointers have.
  762.    After generation of rtl, the compiler makes no further distinction
  763.    between pointers and any other objects of this machine mode.  */
  764. #define Pmode SImode
  765.  
  766. /* A function address in a call instruction
  767.    is a byte address (for indexing purposes)
  768.    so give the MEM rtx a byte's mode.  */
  769. #define FUNCTION_MODE SImode
  770.  
  771. /* Define this if addresses of constant functions
  772.    shouldn't be put through pseudo regs where they can be cse'd.
  773.    Desirable on machines where ordinary constants are expensive
  774.    but a CALL with constant address is cheap.  */
  775. #undef NO_FUNCTION_CSE
  776.  
  777. /* Compute the cost of computing a constant rtl expression RTX
  778.    whose rtx-code is CODE.  The body of this macro is a portion
  779.    of a switch statement.  If the code is computed here,
  780.    return it with a return statement.  Otherwise, break from the switch.  */
  781.  
  782. #define CONST_COSTS(RTX,CODE) \
  783.   case CONST_INT:                        \
  784.   case CONST:                            \
  785.   case LABEL_REF:                        \
  786.   case SYMBOL_REF:                        \
  787.   case CONST_DOUBLE:                        \
  788.     return 2;
  789.  
  790. /* Store in cc_status the expressions
  791.    that the condition codes will describe
  792.    after execution of an instruction whose pattern is EXP.
  793.    Do not alter them if the instruction would not alter the cc's.  */
  794.  
  795. #define NOTICE_UPDATE_CC(EXP, INSN) notice_update_cc ( EXP, INSN )
  796.  
  797. /* Control the assembler format that we output.  */
  798.  
  799. /* Output at beginning of assembler file.  */
  800.  
  801. #define ASM_FILE_START(FILE) asm_file_start ( FILE ) 
  802.  
  803. # define ASM_FILE_END(FILE) asm_file_end ( FILE )
  804.  
  805. /* Output to assembler file text saying following lines
  806.    may contain character constants, extra white space, comments, etc.  */
  807. extern char* asm_app_toggle ();
  808. #define ASM_APP_ON asm_app_toggle ()
  809.  
  810. /* Output to assembler file text saying following lines
  811.    no longer contain unusual constructs.  */
  812.  
  813. #define MAX_TEXT_ALIGN 1
  814.  
  815. #define ASM_APP_OFF asm_app_toggle ()
  816.  
  817. #define SELECT_RTX_SECTION( MODE, X )                    \
  818. {                                    \
  819.     if ( GET_MODE_BITSIZE ( MODE ) > MAX_TEXT_ALIGN )            \
  820.     {                                    \
  821.     data_section ();                        \
  822.     }                                    \
  823.     else                                \
  824.     {                                    \
  825.     text_section ();                        \
  826.     }                                    \
  827. }
  828.  
  829. #define SELECT_SECTION(DECL)                            \
  830. {                                        \
  831.     if ( FUNCTION_DECL == TREE_CODE ( DECL ) )                    \
  832.     { text_section (); } else { data_section (); }                \
  833. }
  834.  
  835.  
  836. /* Output before read-only data.  */
  837.  
  838. char *text_section_asm_op ( );
  839. #define TEXT_SECTION_ASM_OP text_section_asm_op ( )
  840.  
  841. /* Output before writable data.  */
  842.  
  843. char *data_section_asm_op ( );
  844. #define DATA_SECTION_ASM_OP data_section_asm_op ( )
  845.  
  846. /* How to refer to registers in assembler output.
  847.    This sequence is indexed by compiler's hard-register-number (see above).  */
  848.  
  849. #define REGISTER_NAMES                 \
  850. { "d0", "d0", "d0", "d1", "d1", "d1",        \
  851.   "d2", "d2", "d2", "d3", "d3", "d3",        \
  852.   "d4", "d4", "d4", "d5", "d5", "d5",        \
  853.   "d6", "d6", "d6", "d7", "d7", "d7",        \
  854.   "r0", "r1", "r2", "r3", "r4", "r5",        \
  855.   "r6", "r7",                    \
  856.   "n0", "n1", "n2", "n3", "n4", "n5",        \
  857.   "n6", "n7" }
  858.  
  859. /* How to renumber registers for dbx and gdb.  */
  860.  
  861. #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
  862.  
  863. /* This is how to output the definition of a user-level label named NAME,
  864.    such as the label on a static function or variable NAME.  */
  865.  
  866. #define ASM_IDENTIFY_GCC(FILE) fprintf ( FILE, ";*** DSP96002 %s GNU %s\n", motorola_version_string, version_string );
  867.  
  868. #define ASM_OUTPUT_LABEL(FILE,NAME)    \
  869.   do { assemble_name (FILE, NAME); fputs ("\n", FILE); } while (0)
  870.  
  871. /* This is how to output a command to make the user-level label named NAME
  872.    defined for reference from other files.  */
  873.  
  874. #define ASM_GLOBALIZE_LABEL(FILE,NAME)    \
  875. ( fputs ("\tglobal\t", FILE), assemble_name (FILE, NAME), fputs ("\n", FILE) )
  876.  
  877. /* This is how to output a reference to a user-level label named NAME.
  878.    `assemble_name' uses this.  */
  879.  
  880. #define ASM_OUTPUT_LABELREF(FILE,NAME)    \
  881.   fprintf (FILE, "F%s", NAME)
  882.  
  883. /* This is how to output an internal numbered label where
  884.    PREFIX is the class of label and NUM is the number within the class.  */
  885.  
  886. #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)    \
  887.   fprintf (FILE, "%s%d\n", PREFIX, NUM)
  888.  
  889. /* This is how to store into the string LABEL
  890.    the symbol_ref name of an internal numbered label where
  891.    PREFIX is the class of label and NUM is the number within the class.
  892.    This is suitable for output with `assemble_name'.  */
  893.  
  894. #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)    \
  895.   sprintf (LABEL, "*%s%d", PREFIX, NUM)
  896.  
  897. /* This is how to output an assembler line defining a `double' constant.  */
  898.  
  899. #define ASM_OUTPUT_DOUBLE(FILE,VALUE)  \
  900.     (( 'l' == memory_model ) ?\
  901.       (void) fprintf (FILE, "\tdc\t%.20e\n", (VALUE)) :\
  902.       ((void) fprintf (FILE, "\tdc\t(@lfr(%.20e))>>32\n", (VALUE)),\
  903.        (void) fprintf (FILE, "\tdc\t(@lfr(%.20e))&$ffffffff\n", (VALUE))))
  904.  
  905. /* This is how to output an assembler line defining a `float' constant.  */
  906.  
  907. #define ASM_OUTPUT_FLOAT(FILE,VALUE)  \
  908.   fprintf (FILE, "\tdc\t@frc(%.12e)\n", (VALUE))
  909.  
  910. /* This is how to output an assembler line defining an `int' constant.  */
  911.  
  912. #define ASM_OUTPUT_INT(FILE,VALUE)  \
  913. ( fprintf (FILE, "\tdc "),            \
  914.   output_addr_const (FILE, (VALUE)),        \
  915.   fprintf (FILE, "\n"))
  916.  
  917. /* Likewise for `short' and `char' constants.  */
  918.  
  919. #define ASM_OUTPUT_SHORT(FILE,VALUE)  \
  920. ( fprintf (FILE, "\tdc "),            \
  921.   output_addr_const (FILE, (VALUE)),        \
  922.   fprintf (FILE, "\n"))
  923.  
  924. #define ASM_OUTPUT_CHAR(FILE,VALUE)  \
  925. ( fprintf (FILE, "\tdc "),            \
  926.   output_addr_const (FILE, (VALUE)),        \
  927.   fprintf (FILE, "\n"))
  928.  
  929. /* This is how to output an assembler line for a numeric constant byte.  */
  930.  
  931. #define ASM_OUTPUT_BYTE(FILE,VALUE)  \
  932.   fprintf (FILE, "\tdc $%x\n", (VALUE))
  933.  
  934. #define ASM_OUTPUT_ASCII(FILE, P, SIZE)  \
  935.   output_ascii (FILE, P, SIZE)
  936.  
  937. # define ASM_OUTPUT_CASE_LABEL(STREAM, PREFIX, NUM, TABLE )     \
  938.   ( fprintf (STREAM, "%s\n", DATA_SECTION_ASM_OP ),        \
  939.   ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM))
  940.  
  941. # define ASM_OUTPUT_CASE_END(STREAM, NUM, TABLE )         \
  942.   fprintf (STREAM, "%s\n", TEXT_SECTION_ASM_OP )        \
  943.  
  944. /* This is how to output an element of a case-vector that is relative.  */
  945.  
  946. #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL)  \
  947.   fprintf (FILE, "\tdc L%d-L%d\n", VALUE, REL)
  948.  
  949. /* This is how to output an element of a case-vector that is absolute.  */
  950.  
  951. #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \
  952.   fprintf (FILE, "\tdc L%d\n", VALUE)
  953.  
  954. /* This is how to output an assembler line
  955.    that says to advance the location counter
  956.    to a multiple of 2**LOG bytes.  */
  957.  
  958. #define ASM_OUTPUT_ALIGN(FILE,LOG)    \
  959.   if ((LOG) != 0)            \
  960.     fprintf (FILE, "\t;align %d\n", 1<<(LOG))
  961.  
  962. #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
  963.   fprintf (FILE, "\tbsc\t%d,0\n", (SIZE))
  964.  
  965. /* This says how to output an assembler line
  966.    to define a global common symbol.  */
  967.  
  968. #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)          \
  969. ( assemble_name ((FILE), (NAME)),                \
  970.   fprintf ((FILE), "\tbsc\t%d\n", (ROUNDED)),            \
  971.   ASM_GLOBALIZE_LABEL((FILE),(NAME)))
  972.  
  973. /* This says how to output an assembler line
  974.    to define a local common symbol.  */
  975.  
  976. #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)  \
  977. ( assemble_name ((FILE), (NAME)),                \
  978.   fprintf ((FILE), "\tbsc\t%d,0\n", (ROUNDED)))
  979.  
  980. /* Store in OUTPUT a string (made with alloca) containing
  981.    an assembler-name for a local static variable named NAME.
  982.    LABELNO is an integer which is different for each call.  */
  983.  
  984. #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO)    \
  985. ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),    \
  986.   sprintf ((OUTPUT), "___%s%d", (NAME), (LABELNO)))
  987.  
  988. /* Define the parentheses used to group arithmetic operations
  989.    in assembler code.  */
  990.  
  991. #define ASM_OPEN_PAREN "("
  992. #define ASM_CLOSE_PAREN ")"
  993.  
  994. /* Define results of standard character escape sequences.  */
  995. #define TARGET_BELL 007
  996. #define TARGET_BS 010
  997. #define TARGET_TAB 011
  998. #define TARGET_NEWLINE 012
  999. #define TARGET_VT 013
  1000. #define TARGET_FF 014
  1001. #define TARGET_CR 015
  1002.  
  1003. /* Print operand X (an rtx) in assembler syntax to file FILE.
  1004.    CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
  1005.    For `%' followed by punctuation, CODE is the punctuation and X is null.
  1006. */
  1007.  
  1008. #define PRINT_OPERAND(FILE, X, CODE) print_operand ( FILE, X, CODE )
  1009.  
  1010. /* Print a memory address as an operand to reference that memory location.  */
  1011.  
  1012. #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address ( FILE, ADDR )
  1013.  
  1014. # define ASM_OUTPUT_REG_PUSH( FILE, REGNO )
  1015. # define ASM_OUTPUT_REG_POP( FILE, REGNO )
  1016.  
  1017. # define ASM_OUTPUT_OPCODE( FILE, OPCODE ) asm_output_opcode ( FILE, OPCODE )
  1018.  
  1019. extern double ldexp ( );
  1020.  
  1021. /* the following definitions and declarations are used to efficiently
  1022.    implement the use of either memory space. */
  1023.  
  1024. /* this structure is used within the code generator. it is initialized upon
  1025.    first use. */
  1026.  
  1027. struct dsp_string
  1028. {
  1029.     int init;
  1030.     char string[256];
  1031. };
  1032.  
  1033. /* RETURN_DSP provides a mechanism for the code generator to use this facility
  1034.    transparently. */
  1035.  
  1036. #define RETURN_DSP( str ) \
  1037. { static struct dsp_string template = { 0, str }; \
  1038.       return fix_mem_space ( & template ); }
  1039.  
  1040. /* global memory space indicator - either 'x' or 'y'. */
  1041. extern char mem_space;
  1042. extern char memory_model;
  1043. /* tells sdbout which prolog/epilog pair is being used. */
  1044. extern int logue_index;
  1045.  
  1046. extern char *fix_mem_space ( );
  1047.  
  1048. /* this data type is used to pass information about the function to the
  1049.    optimizer and code generator, and pro/epilog generators. */
  1050.  
  1051. typedef enum 
  1052. {
  1053.     FUNC_NO_INFO = 0x0000,
  1054.     FUNC_ISNT_LEAF = 0x0001, /* this func makes at least one call */
  1055.     FUNC_RETURNS_FLOAT = 0x0002, /* a float/double value is returned */
  1056.     FUNC_HAS_STACK_PARMS = 0x0004, /* this func has at least one stack parm */
  1057.     FUNC_RETURNS_VOID =0x0008 /* this function is of type void. */
  1058. } func_attributes;
  1059.  
  1060. /* a global var used for the aformentioned purpose. */
  1061. extern func_attributes current_func_info;
  1062.  
  1063. /* this enum is used as the mdep portion of cc_... structs. branches, conds and
  1064.    jumps on the 96k need to know whether the ccs were set by a floating point
  1065.    instruction or not. */
  1066.  
  1067. typedef enum
  1068. {
  1069.     INTEGER_CCS, /* regular cmp or integer op. */
  1070.     FLOAT_CCS    /* fcmp or floating op. */
  1071. } compare_type;
  1072.  
  1073. #define CC_STATUS_MDEP_INIT INTEGER_CCS
  1074. #define CC_STATUS_MDEP compare_type
  1075.  
  1076. /* these force a min number of operands allowed. */
  1077. #define MIN_RECOG_OPERANDS 16
  1078. #define MIN_DUP_OPERANDS 16
  1079.  
  1080. /* we undef abort so that we can print a proper warning message and not dump
  1081.    core. (code in rtl.c) */
  1082. #undef abort
  1083.  
  1084. typedef struct
  1085. {
  1086.     int no_latency_addr_reg_op_p;
  1087. }
  1088. dsp96k_insn_info;
  1089.  
  1090. #define INSN_MACHINE_INFO dsp96k_insn_info
  1091.  
  1092. /* allow certain pragmas. */
  1093. int dsp_process_pragma_line ( );
  1094.  
  1095. #define TARGET_PROCESS_PRAGMA_LINE( f ) \
  1096. dsp_process_pragma_line ( f )
  1097.